package cn.net.isir.controller.common;

import java.util.Base64;

/**
 * @author liuxubo
 * @filename UploadDto.java
 * @package cn.net.isir.controller.common
 * @email lxb@isir.net.cn
 * @date 2019/02/14
 * @comment
 * @since 1.8
 */
public class Base64Dto {
    //base64数据
    private String base64;
    //数据类型
    private String type;
    //文件名
    private String name;

    public String getBase64() {
        return base64;
    }

    public void setBase64(String base64) {
        this.base64 = base64;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public byte[] getBytes() {
        return Base64.getDecoder().decode(base64.replace("data:image/jpeg;base64,", ""));
    }
}
